import java.io.*;

public class ListFileTree {
	public static void main(String[] args) {
		File f =new File("F:/A");
		System.out.println(f.getName());
		list(f,1);
	}
	
	private static void list(File f,int level) {
		File[] childs=f.listFiles();
		String preStr="";
		for(int j=0;j<level;j++) {
			preStr+="    ";
		}
		for(int i=0;i<childs.length;i++) {
			System.out.println(preStr+childs[i].getName());
			if(childs[i].isDirectory()) {
				list(childs[i],level+1);
			}
		}
	}
}